package cn.tedu.controller;

import cn.tedu.service.NovelMesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class NovelMesController {
    @Autowired
    private NovelMesService novelMesService;
    //小说简介查询
    @GetMapping("/findSynopsisById")
    public String getSynopsisById(Integer id){
        String synopsis = novelMesService.getSynopsisById(id);
        return synopsis;
    }
    //小说作者查询
    @GetMapping("/findAuthorById")
    public String getAuthorById(Integer id){
        String author = novelMesService.getAuthorById(id);
        return author;
    }
    //小说字数查询
    @GetMapping("/findAuthorById")
    public Integer getTextById(Integer id){
        Integer text = novelMesService.getTextById(id);
        return text;
    }
    //小说名查询
    @GetMapping("/findTitleById")
    public String getTitleById(Integer id){
        String author = novelMesService.getTitleById(id);
        return author;
    }
}
